package com.xlstjs.model;

import java.util.Date;
import java.util.Objects;

/**
 * ---闪光头目大狗狗---
 * --代码敲烂月薪过万--
 *
 * @author WangHao
 * @Date 2023/11/27 11:02:26
 * @Desc
 */
public class User {

    private int id;
    private String username;
    private String password;
    private Date birthday;
    private double score;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", birthday=" + birthday +
                ", score=" + score +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id == user.id && Double.compare(user.score, score) == 0 && Objects.equals(username, user.username) && Objects.equals(password, user.password) && Objects.equals(birthday, user.birthday);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, birthday, score);
    }

    public User(int id, String username, String password, Date birthday, double score) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.birthday = birthday;
        this.score = score;
    }

    public User() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
